// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.Warehouse;
import com.fowo.api.model.warehouse.WarehouseFBABinVo;
import com.fowo.api.model.warehouse.WarehouseItemVo;
import com.fowo.api.model.warehouse.WarehouseLocalAndOverseasVo;
import com.fowo.api.model.warehouse.WarehouseSearchParamPo;
import com.fowo.api.model.warehouse.WarehouseVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface WarehouseMapper extends BaseMapper<Warehouse> {
  Page<WarehouseItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") WarehouseSearchParamPo search
  );
  List<OptionItem<WarehouseItemVo>> searchOptions(
    @Param("search") WarehouseSearchParamPo search
  );
  List<WarehouseItemVo> search(@Param("search") WarehouseSearchParamPo search);
  Date searchLastUpdateTime(@Param("search") WarehouseSearchParamPo search);
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") WarehouseSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") WarehouseSearchParamPo search);
  Long getIdByName(@Param("name") String name);

  List<Long> getIdsByName(@Param("list") List<String> list);

  String getNameById(@Param("id") Long id);

  List<Map<String, Object>> getNameByIds(@Param("ids") List<Long> ids);
  WarehouseVo selectVoById(@Param("id") Long id);
  /**
   * 本地仓与海外仓
   */
  List<WarehouseLocalAndOverseasVo> localAndOverseas(
    @Param("search") WarehouseSearchParamPo search
  );

  /**
   * 获取本地仓与海外仓编号列表
   */
  List<Long> localAndOverseasIds(
    @Param("search") WarehouseSearchParamPo search
  );

  /**
   * 获取本地仓与海外仓的总数
   */
  Long localAndOverseasCount(@Param("search") WarehouseSearchParamPo search);

  /**
   * 本地仓与海外仓分页
   */
  Page<WarehouseLocalAndOverseasVo> localAndOverseasPage(
    @Param("page") Page page,
    @Param("search") WarehouseSearchParamPo search
  );
  Date localAndOverseasLastUpdateTime(
    @Param("search") WarehouseSearchParamPo search
  );
  /**
   * FBA仓
   */
  List<WarehouseFBABinVo> fBABin(
    @Param("search") WarehouseSearchParamPo search
  );

  /**
   * 获取FBA仓编号列表
   */
  List<Long> fBABinIds(@Param("search") WarehouseSearchParamPo search);

  /**
   * 获取FBA仓的总数
   */
  Long fBABinCount(@Param("search") WarehouseSearchParamPo search);

  /**
   * FBA仓分页
   */
  Page<WarehouseFBABinVo> fBABinPage(
    @Param("page") Page page,
    @Param("search") WarehouseSearchParamPo search
  );
  Date fBABinLastUpdateTime(@Param("search") WarehouseSearchParamPo search);
  /**
   * 选择用视图
   */
  List<WarehouseItemVo> selectHide(
    @Param("search") WarehouseSearchParamPo search
  );

  /**
   * 获取选择用视图编号列表
   */
  List<Long> selectHideIds(@Param("search") WarehouseSearchParamPo search);

  /**
   * 获取选择用视图的总数
   */
  Long selectHideCount(@Param("search") WarehouseSearchParamPo search);

  /**
   * 选择用视图分页
   */
  Page<WarehouseItemVo> selectHidePage(
    @Param("page") Page page,
    @Param("search") WarehouseSearchParamPo search
  );
  Date selectHideLastUpdateTime(@Param("search") WarehouseSearchParamPo search);
}
